import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Header from '@/components/header'
import Loading from '@/components/loading'
import Login from '@/components/pages/login'
import MyInfo from '@/components/pages/myInfo'
import ProtectRecord from '@/components/pages/protectRecord'
import OpenProtect from '@/components/pages/openProtect'


Vue.use(Router)

export default new Router({
  routes: [
  	{
  		path: '/',
  		redirect: '/openProtect'
  	},{
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld,
      meta:{
      	title: 'hello'
      }
    },{
      path: '/login',
      name: 'login',
      component: Login,
      meta: {
      	title: '登录'
      }
    },{
      path: '/myInfo',
      name: 'myInfo',
      component: MyInfo,
      meta: {
      	title: '我的信息'
      }
    },{
      path: '/protectRecord',
      name: 'protectRecord',
      component: ProtectRecord,
      meta: {
      	title: '保护记录'
      }
    },{
      path: '/openProtect',
      name: 'openProtect',
      component: OpenProtect,
      meta: {
      	title: '开启保护'
      }
    }
  ]
})
